package com.dlwx.parttimetalent.adapter;

import android.content.Context;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.dlwx.parttimetalent.R;
import com.dlwx.parttimetalent.bean.LabelClassifyBean;

/**
 * Created by Administrator on 2017/11/21.
 */

public class LabelClassifyAdapter extends ListBaseAdapter<LabelClassifyBean.BodyBean> {
    Context context;
    public LabelClassifyAdapter(Context context) {
        super(context);
        this.context=context;
    }

    @Override
    public int getLayoutId() {
        return R.layout.tv_label;
    }

    @Override
    public void onBindItemHolder(SuperViewHolder holder, int position) {
        LabelClassifyBean.BodyBean bean = getDataList().get(position);
        ImageView imageView=holder.getView(R.id.image);
        TextView tvName=holder.getView(R.id.tv_name);
        Glide.with(context).load(bean.getLabelicon()).into(imageView);
        tvName.setText(bean.getClassname());
    }
}
